package ee.mtiidla.data;

import java.util.List;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;

/**
 * Created by Marko on 12.10.2014.
 */
@XmlAccessorType(XmlAccessType.FIELD)
public class Athlete {

	@XmlAttribute(name = "athleteid")
	private long athleteId;

	@XmlAttribute(name = "firstname")
	private String firstName;

	@XmlAttribute(name = "lastname")
	private String lastName;

	@XmlAttribute(name = "gender")
	private String gender;

	@XmlAttribute(name = "birthdate")
	private String birthdate;

	@XmlAttribute(name = "nation")
	private String nation;

	@XmlElementWrapper(name="RESULTS")
	@XmlElement(name="RESULT")
	private List<Result> results;

	@XmlElementWrapper(name="ENTRIES")
	@XmlElement(name="ENTRY")
	private List<Entry> entries;

	public long getAthleteId() {
		return athleteId;
	}

	public void setAthleteId(long athleteId) {
		this.athleteId = athleteId;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public String getGender() {
		return gender;
	}

	public void setGender(String gender) {
		this.gender = gender;
	}

	public String getBirthdate() {
		return birthdate;
	}

	public void setBirthdate(String birthdate) {
		this.birthdate = birthdate;
	}

	public String getNation() {
		return nation;
	}

	public void setNation(String nation) {
		this.nation = nation;
	}

	public List<Result> getResults() {
		return results;
	}

	public void setResults(List<Result> results) {
		this.results = results;
	}

	public List<Entry> getEntries() {
		return entries;
	}

	public void setEntries(List<Entry> entries) {
		this.entries = entries;
	}

	public String toString() {

		return firstName + " " + lastName;

	}
}
